import sys
import codecs
codecs.register_error("strict", codecs.replace_errors)
import re

if __name__ == '__main__':
    input_file = sys.argv[1]
    for l in open(input_file):
        if len(l.strip()) > 1:
            d = re.split(r'，|！| 。|\?|？|\*', l)
            for k in d:
                if 2 < len(k.strip().split(' ')) < 15:
                    print(re.sub(r'\d+', 'N', k.strip()))
